﻿<UserControl x:Class="ModernWSPView.Pages.PageListFieldsOfContentTypes"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Style="{StaticResource ContentRoot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="80" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <!--Entête-->
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            
            <TextBlock Text="ID"/>
            <TextBox IsReadOnly="True" Text="{Binding Path=ContentTypeId}" Grid.Column="1" Background="{x:Null}" BorderBrush="{x:Null}" />
            
            <TextBlock Text="Nom" Grid.Row="1" />
            <TextBox IsReadOnly="True" Text="{Binding Path=ContentTypeName}" Grid.Column="1" Grid.Row="1" Background="{x:Null}" BorderBrush="{x:Null}" />
            
            <TextBlock Text="Groupe" Grid.Row="2" />
            <TextBox IsReadOnly="True" Text="{Binding Path=ContentTypeGroup}" Grid.Column="1" Grid.Row="2" Background="{x:Null}" BorderBrush="{x:Null}" />
        </Grid>

        <!--Champs-->
        <ScrollViewer Grid.Row="1">
            <DataGrid AutoGenerateColumns="False" ItemsSource="{Binding Path=AllFields}">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="ID" HeaderStyle="{StaticResource ResourceKey=AlignLeftHeaderStyle}" Binding="{Binding XPath=@ID}"/>
                    <DataGridTextColumn Header="Name" HeaderStyle="{StaticResource ResourceKey=AlignLeftHeaderStyle}" Binding="{Binding XPath=@Name}" Width="*"/>
                </DataGrid.Columns>
            </DataGrid>
        </ScrollViewer>
    </Grid>
</UserControl>
